]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar-server: Update views only after the time range is set
authorMilan Crha <mcrha@redhat.com>
Mon, 30 Apr 2018 15:58:43 +0000 (17:58 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 2 May 2018 14:10:33 +0000 (16:10 +0200)
The gnome-shell-calendar-server calls to refresh queries even when it
has no time range set, which results in:
  a) waste of resources (for example after login),
  b) many runtime warnings in the journalctl log, related to
     incorrect time range being used.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/244

src/calendar-server/gnome-shell-calendar-server.c

index e979f7ff3c73187ce9f98a0835073e1a5b76d487..9b76fb07318f4f0813014d5a6a0c0525f9da6ce7 100644 (file)
@@ -590,6 +590,11 @@ app_load_events (App *app)
   g_list_free (app->live_views);
   app->live_views = NULL;
 
+  if (!app->since || !app->until)
+    {
+      print_debug ("Skipping load of events, no time interval set yet");
+      return;
+    }
   /* timezone could have changed */
   app_update_timezone (app);